home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / computer vision recognition / rcinstall.exe / Disk1 / data1.cab / ASP_Pages / Utility.asp < prev   
Encoding:
Text File  |  2001-12-12  |  2.3 KB  |  69 lines

  1. <%@ LANGUAGE = VBScript %>
  2.     <%
  3.         Response.Expires = 60
  4.         Response.Expiresabsolute = Now() - 1
  5.         Response.AddHeader "pragma","no-cache"
  6.         Response.AddHeader "cache-control","private"
  7.         Response.CacheControl = "no-cache"
  8.  
  9. '---------------------------------------------------------------------------------------------------
  10. 'Getting local strings
  11. '--------------------------------------------------------------------------------------------------
  12.         dim oConn,oRs,i,sFilePath,sLangTable
  13.         dim display 
  14.         on error resume next
  15.         set oConn = Server.CreateObject("ADODB.Connection")
  16.         sFilePath=Server.MapPath("csuiweb.mdb")
  17.         
  18.         oConn.Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & sFilePath & ";")
  19.         if err then
  20.                set oConn=nothing
  21.             err.clear
  22.             Response.Redirect("Error.asp?Err=1")
  23.         end if
  24.         sLangTable=mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"),1,2)
  25.         if trim("" & sLangTable)="" then
  26.             sLangTable="En"
  27.         end if    
  28.         Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
  29.         if (err and (Err.Number=-2147217865)) then        
  30.             err.Clear
  31.             sLangTable="En"
  32.             Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
  33.         end if        
  34.         Response.Write("<META HTTP-EQUIV='CONTENT-LANGUAGE' CONTENT='" & oRS("Value") & "'>")
  35.         Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=2 ")
  36.         display=oRs("Value")
  37.         oRs.Close
  38.         oConn.Close
  39.         if err then
  40.             err.clear
  41.             Response.Redirect("Error.asp?Err=1")
  42.         end if    
  43.             
  44. %>
  45.  
  46. <html>
  47. <head>
  48.  
  49. <script language="JavaScript">
  50. function Rechange(x,y)
  51. {
  52.     dialogLeft = x-1;
  53.     dialogLeft = x;
  54.     dialogTop = y;
  55. }
  56. </script>
  57.         <TITLE><%=display%></TITLE>
  58. </head>
  59. <frameset  rows="133,*" border="1" bordercolor="black" framespacing="0"  >
  60. <!---
  61.     <frame name="header" src='UtilHeader.asp?lang=<%=Request.QueryString("lang")%>' scrolling="no" frameborder="0" framespacing="0" >
  62.     <frame name="body" src='UtilBody.asp?lang=<%=Request.QueryString("lang")%>' scrolling="auto" frameborder="0" framespacing="0">
  63.  --->
  64.     <frame name="header" src="UtilHeader.asp?Nocache=<%=server.URLencode(now())%>" scrolling="no" frameborder="0" framespacing="0" >
  65.     <frame name="body" src="UtilBody.asp?Nocache=<%=server.URLencode(now())%>" scrolling="auto" frameborder="0" framespacing="0">
  66.  
  67.  </frameset>
  68. </html>
  69.